SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].gspAccount_INSERT
(
@userName AS nvarchar(100) = null,
@email AS nvarchar(100) = null,
@password AS nvarchar(128) = null,
@passwordSalt AS nvarchar(128) = null,
@lastLoginDate AS datetime = null,
@lastLoginIp AS nvarchar(40) = null,
@isActivated AS bit = null,
@isLockedOut AS bit = null,
@lastLockedOutDate AS datetime = null,
@lastLockedOutReason AS nvarchar(256) = null,
@newPasswordKey AS nvarchar(128) = null,
@newPasswordRequested AS datetime = null,
@newEmail AS nvarchar(128) = null,
@newEmailKey AS nvarchar(128) = null,
@newEmailRequested AS datetime = null,
@comments AS nvarchar(256) = null,
@createdDate AS datetime = null,
@lastModifiedDate AS datetime = null
)
AS

INSERT INTO
  [dbo].[Account]
(
  [UserName],
  [Email],
  [Password],
  [PasswordSalt],
  [LastLoginDate],
  [LastLoginIp],
  [IsActivated],
  [IsLockedOut],
  [LastLockedOutDate],
  [LastLockedOutReason],
  [NewPasswordKey],
  [NewPasswordRequested],
  [NewEmail],
  [NewEmailKey],
  [NewEmailRequested],
  [Comments],
  [CreatedDate],
  [LastModifiedDate]
)
VALUES
(
  @userName,
  @email,
  @password,
  @passwordSalt,
  @lastLoginDate,
  @lastLoginIp,
  @isActivated,
  @isLockedOut,
  @lastLockedOutDate,
  @lastLockedOutReason,
  @newPasswordKey,
  @newPasswordRequested,
  @newEmail,
  @newEmailKey,
  @newEmailRequested,
  @comments,
  @createdDate,
  @lastModifiedDate
)

SELECT SCOPE_IDENTITY()


GO
